package net.oschina.archx.spring.mybatis.service;

import net.oschina.archx.spring.mybatis.dao.UserMapper;
import net.oschina.archx.spring.mybatis.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * UserService
 *
 * @author Archx
 * @date 2015/7/1 0001
 */
@Service
public class UserService {

    @Autowired
    private UserMapper userMapper;

    public int create(User user) {
        return userMapper.create(user);
    }

    public List<User> findAll() {
        return userMapper.findAll();
    }
}
